home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / gtlayout-source.lha / LTP_AdjustMenuPosition.c < prev    next >
C/C++ Source or Header  |  1996-03-18  |  639b  |  32 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14. #ifdef DO_MENUS
  15.  
  16.     /* AdjustMenuPosition(RootMenu *Root):
  17.      *
  18.      *    Calculate the effective positions of the menus
  19.      *    and submenus.
  20.      */
  21.  
  22. VOID
  23. LTP_AdjustMenuPosition(RootMenu *Root)
  24. {
  25.     MenuNode *Menu;
  26.  
  27.     for(Menu = (MenuNode *)Root->MenuList.mlh_Head ; Menu->Node.mln_Succ ; Menu = (MenuNode *)Menu->Node.mln_Succ)
  28.         Menu->Width = LTP_AdjustItemPosition(Menu->Menu.FirstItem,Menu->Menu.LeftEdge + 4,Root->Screen->BarHeight + 1);
  29. }
  30.  
  31. #endif    /* DO_MENUS */
  32.